Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

225
Vistas
Discordia.js | JSON: sistema de tickets, el bot no crea un canal de tickets

mi bot no está creando un canal de tickets cuando un usuario está reaccionando al emoji, el bot solo está creando un canal de tickets cuando le doy derechos de administrador a mi bot dentro del propio rol de Discord.

¿Qué podría estar mal en mi código cuando el usuario reacciona al emoji? ¿Falta algo o faltan permisos a continuación? ID de mis bots 701327880046510080

Y por cierto. en mi discordia, le he dado a mi bot todos los derechos, pero no los derechos de administrador en la parte inferior de los permisos de roles.

¡Cualquier ayuda sería apreciada!

 if(reaction.message.id == ticketid && reaction.emoji.name == '🎫') { reaction.users.remove(user); const ticketChannel = reaction.message.guild.channels.cache.find(chan => chan.name === `ticket-${user.username}`) if (ticketChannel) return; reaction.message.guild.channels.create(`ticket-${user.username}`, { parent: '701254271861260389', position: 1, permissionOverwrites: [ { id: '701327880046510080', allow: ["MANAGE_CHANNELS", "MANAGE_GUILD", "MANAGE_ROLES", "MANAGE_EMOJIS", "READ_MESSAGE_HISTORY", "MANAGE_MESSAGES", "SEND_MESSAGES", "VIEW_CHANNEL"] }, { id: user.id, allow: ["SEND_MESSAGES", "VIEW_CHANNEL", "READ_MESSAGE_HISTORY"] }, { id: reaction.message.guild.roles.everyone, deny: ["VIEW_CHANNEL"] }, { id: '306893721725829121', allow: ["SEND_MESSAGES", "VIEW_CHANNEL", "READ_MESSAGE_HISTORY"] } ],
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Definitivamente es un problema de permisos, ya que dijiste que solo funciona cuando le das al administrador del bot. También podría deberse al fragmento a continuación, está otorgando el permiso pero luego se lo niega a todos.

 { id: reaction.message.guild.roles.everyone, deny: ["VIEW_CHANNEL"] },
about 4 years ago · Juan Pablo Isaza Denunciar

0

Intente esto y avíseme si / qué errores obtiene con la await . Deberá asegurarse de que su oyente sea async , por lo que es posible que deba agregarse al código anterior, que según la otra pregunta debería ser.

 if (reaction.message.id == ticketid && reaction.emoji.name == '🎫') { reaction.users.remove(user); const channelName = `ticket-${user.username}`; const ticketChannel = reaction.message.guild.channels.cache.find(chan => chan.name === channelName); if (ticketChannel) return; const newChannel = await reaction.message.guild.channels.create(channelName, { parent: '701254271861260389', position: 1, permissionOverwrites: [{ id: reaction.message.guild.id, deny: ["VIEW_CHANNEL"], }, { id: user, allow: ["SEND_MESSAGES", "VIEW_CHANNEL", "READ_MESSAGE_HISTORY"], }, { id: '306893721725829121', allow: ["SEND_MESSAGES", "VIEW_CHANNEL", "READ_MESSAGE_HISTORY"], }, { id: '701327880046510080', allow: ["MANAGE_CHANNELS", "MANAGE_GUILD", "MANAGE_ROLES", "MANAGE_EMOJIS", "READ_MESSAGE_HISTORY", "MANAGE_MESSAGES", "SEND_MESSAGES", "VIEW_CHANNEL"] }], }).catch((error) => { console.log(error) }); console.log(newChannel); }

Si lo anterior falla, es probable que se trate de un problema de permisos, solo necesita averiguar con certeza qué lo impide.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda